<!DOCTYPE html>
<html>
    <head>
        <meta name="author" content="Kwh">
        <meta charset="utf-8">
        <script src="../js/jquery-3.1.1.js"></script>
        <title></title>
        <style>
            p{
                font-size: 20px;
            }
            p strong{
                font-size: 25px;
            }
        </style>
    </head>
    <body>
        <textarea rows="10" cols="50"></textarea>
        <p></p>
    </body>
</html>

<script>

    $('textarea').keyup(function(){

    var len = $('textarea').val().length;
    // var str = $('textarea').val().charCodeAt();
    
    
    $('p').html('输入了：<strong>'+len+'</strong>个字')
   
    if(len>=140){
        $('strong').css('color','orange')
    }



})


</script>